@monospace-font: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC',
  'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
@line-space: 22px;
@h1-color: #773098;
@h2-color: #916dd5;
@h3-color: #d89cf6;
@code-color: #916dd5;
@i-em-color: #916dd5;
@b-strong-color: #916dd5;
@a-color: #916dd5;
@a-hover-active-color: #773098;

.markdown-body {
  line-height: 1.75;
  font-family: @monospace-font;
  letter-spacing: 2px;
  background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%),
    linear-gradient(360deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%);
  background-size: 20px 20px;
  background-position: center center;
  word-break: break-word;
  font-weight: 400;
  font-size: 15px;
  overflow-x: hidden;
  color: #333;

  h1 {
    font-size: 23px;
    margin-bottom: 5px;
    font-weight: bold;
    padding-left: 10px;
    border-left: 5px solid @h1-color;
  }
  h2 {
    font-size: 19px;
    font-weight: bold;
    padding-left: 10px;
    border-left: 5px solid @h2-color;
  }
  h3 {
    font-size: 17px;
    font-weight: bold;
    padding-left: 10px;
    border-left: 5px solid @h3-color;
  }
  h4 {
    font-size: 16px;
  }
  h5 {
    font-size: 15px;
  }
  h6 {
    font-size: 14px;
    margin-top: 5px;
  }

  p {
    line-height: inherit;
    margin-top: @line-space;
    margin-bottom: @line-space;
  }

  img {
    display: block;
    max-width: 100%;
    margin: 1em 0;
    border-radius: 6px;
    box-shadow: 2px 4px 7px #999;
    user-select: none;
  }

  hr {
    border-top: 1px solid #ddd;
    border-bottom: none;
    border-left: none;
    border-right: none;
    margin-top: 32px;
    margin-bottom: 32px;
  }

  code {
    padding: 0.2em 0.5em;
    font-weight: bold;
    font-family: @monospace-font;
    font-size: 1em;
    color: @code-color;
    word-break: break-word;
    overflow-x: auto;
    background-color: none;
    border-radius: 2px;
  }

  pre {
    overflow: auto;
    position: relative;
    line-height: 1.75;

    > code {
      display: block;
      font-family: @monospace-font;
      font-weight: normal;
      font-size: 0.9em;
      padding: 16px 12px;
      margin: 0;
      color: #333;
      word-break: normal;
      overflow-x: auto;
      background: #f8f8f8;
      scroll-behavior: smooth;
    }
  }

  a {
    text-decoration: none;
    color: @a-color;
    font-weight: bold;
    border-bottom: 1px solid @a-color;
    &:hover,
    &:active {
      color: @a-hover-active-color;
    }
  }

  table {
    display: inline-block !important;
    font-size: 14px;
    width: auto;
    max-width: 100%;
    overflow: auto;
    border: solid 1px @a-color;
    border-collapse: collapse;
  }
  thead {
    background-color: @a-color;
    color: #fff;
    text-align: left;
  }
  th,
  td {
    padding: 12px 7px;
    line-height: 24px;
    border: solid 1px @a-color;
  }
  td {
    min-width: 120px;
  }

  blockquote {
    color: #666;
    padding: 1px 23px;
    margin: 22px 0;
    border-left: 4px solid #d89cf6;
    background-color: #f4eeff;
    &::after {
      display: block;
      content: '';
    }
    & > p {
      margin: 10px 0;
      line-height: 26px;
    }
  }

  ol,
  ul {
    padding-left: 28px;
    list-style-type: circle;
    li {
      margin-bottom: 0;
      list-style: inherit;
      & .task-list-item {
        list-style: none;
        ul,
        ol {
          margin-top: 0;
        }
      }
    }

    ul,
    ol {
      margin-top: 3px;
    }
  }
  ol li {
    padding-left: 6px;
  }

  b,
  strong {
    color: @b-strong-color;
    font-weight: bold;

    &::before {
      content: '「';
    }

    &::after {
      content: '」';
    }
  }

  i,
  em {
    color: @i-em-color;
  }

  @media (max-width: 720px) {
    h1 {
      font-size: 24px;
    }
    h2 {
      font-size: 20px;
    }
    h3 {
      font-size: 18px;
    }
  }
}
